#include <iostream>
#include "../include/http/HttpServer.h"
#include "../include/middleWare/CORS/CorsMiddleware.hpp"
#include "../include/router/Router.h"
#include "../include/router/RouterHandler.h"
#include "../include/session/SessionManager.hpp"
#include "../include/session/SessionStorage.hpp"
#include "../include/session/Session.hpp"
#include "../include/session/SessionStorage.hpp"
using namespace http;
int main()
{
    muduo::net::EventLoop loop;
    muduo::net::InetAddress listenAddr(8080);
    HttpServer server(&loop, listenAddr, "testMiddleware");
    server.addMiddleware(std::make_shared<middleWare::CorsMiddleware>());
    server.Get("/", [](const HttpRequest &req, HttpResponse &resp) {
        resp.setBody("Hello, World!");
    });
    server.start();
    return 0;
}